package com.liang.file;

import java.io.File;

public class FileText2 {
    public static void main(String[] args) {
        File file = new File("D:\\itheima\\aaa");
        boolean result1 = file.isDirectory();
        boolean result2 = file.isFile();
        System.out.println(result1);
        System.out.println(result2);

        String name = file.getName();
        System.out.println(name);

        String absolutePath = file.getAbsolutePath();
        System.out.println(absolutePath);

        boolean exists = file.exists();
        System.out.println(exists);
        long length = file.length();
        System.out.println(length);

        String[] list = file.list();
        for (String s : list) {
            System.out.println(s);
        }
    }
}
